<template>
	<view class="content" :style="{height:QHeight + 'px'}">
      <image :style="{height:QHeight + 'px'}"  src="../../static/闪屏页面.jpg"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				time:5,
				QHeight:0
			}
		},
		onLoad() {
			uni.getSystemInfo({
				success: (res) => {
					let height = res.windowHeight - uni.upx2px(0)
					this.QHeight = height
				}
			})
			let timeS = this.time;
			this.QTime(timeS)

		},
		methods: {
			QTime(timeS){
				let timeStart = setInterval(function(){
					timeS--;
					if(timeS == 0){
						clearInterval(timeStart)
						uni.redirectTo({
							  url:"../home/index"
						})
					}
					console.log(timeS)
				},1000,timeS)
			}

		}
	}
</script>

<style>
	.content {
		width: 100%;
		height: 100%;
	}
	.content>image{
		width: 100%;
	}
	
</style>
